package c1761;

import java.sql.Time;
import java.util.Scanner;
 
public class H {
    static class Time24 {
        int hour;
        int minute;
        int second;
 
        public Time24(int hour, int minute, int second) {
            this.hour = hour;
            this.minute = minute;
            this.second = second;
            rationalize();
        }
 
        private void rationalize() {
            minute += second / 60;
            second %= 60;
            hour += minute / 60;
            minute %= 60;
            hour %= 24;
        }
 
        public Time24() {
            this(0, 0, 0);
        }
 
        @Override
        public String toString() {
            return String.format("%02d:%02d:%02d", hour, minute, second);
        }
 
        public Time24 add(Time24 that) {
            return new Time24(this.hour + that.hour, this.minute + that.minute, this.second + that.second);
        }
    }
 
    public static void main(String[] args) {
        for (Scanner cin = new Scanner(System.in); cin.hasNext(); ) {
            Time24 t1 = new Time24(cin.nextInt(), cin.nextInt(), cin.nextInt());
            Time24 t2 = new Time24(cin.nextInt(), cin.nextInt(), cin.nextInt());
            System.out.println(t1.add(t2));
        }
    }
}